home *** CD-ROM | disk | FTP | other *** search
/ Joystick Magazine 1999 November / cd joystick no109 novembre 1999.iso / Data / sharewares / utilitaires / XQXSET50.ZIP / _SETUP.1 / XQ Control Panel Hide 1.xpl < prev    next >
Text File  |  1999-07-19  |  3KB  |  108 lines

  1. "FILE"="Xteq Systems X-Setup Plugin 3.1"
  2. "TYPE"="6"
  3. "COUNT"="5"
  4. "UIPATH"="Appearance\General\Control Panel"
  5. "NAME"="Visible Items #1"
  6. "VERSION"="1.12"
  7. "LANGUAGE"="VBScript"
  8. "TEXT 1"="Display "System Properties" applet"
  9. "TEXT 2"="Display "Display Properties" applet"
  10. "TEXT 3"="Display "Add/Remove Programs" applet"
  11. "TEXT 4"="Display "Internet Control Panel" applet"
  12. "TEXT 5"="Display "Network Properties" applet"
  13. "DESCRIPTION 1"="This plug-in can be used to hide or show the different applets inside Start -> Settings -> Control Panel."
  14. "DESCRIPTION 2"="Not all of these options will be available on every system.  Availability depends upon the software installed on your system."
  15. "DESCRIPTION 3"="NOTE: Hiding the "Internet Control Panel" applet will also hide the "Users" applet on Windows 95 or Windows 98 systems."
  16. "AUTHOR"="Xteq Systems"
  17. "COPYRIGHT"="Copyright ⌐ Xteq Systems - All Rights Reserved"
  18. "COMMENT 1"="For more information, go to http://www.xteq.com or write to TeXHeX@gmx.net."
  19. "COMMENT 2"="Special thanks to Maxwell (maxwello@hotpop.com) for his brilliant tips and CptSiskoX (CptSiskoX@flashmail.com) for his help."
  20. "COMMENT 3"="See also: MS KB Q207750"
  21.  
  22.  
  23. '******************************************************************
  24. '***                MASTER TEMPLATE (1 of X)                   ****
  25. '******************************************************************
  26. sVals=Array("sysdm.cpl","desk.cpl","appwiz.cpl","Inetcpl.cpl","netcpl.cpl") 
  27. sPath="HKCU\Control Panel\Don't Load\"
  28. sFile="CONTROL.INI"
  29. sFileSec="Don't Load"
  30. '******************************************************************
  31. '*** Keep an eye on the order (must be the same as "TEXT x") ! ****
  32. '******************************************************************
  33.  
  34.  
  35.  
  36. SUB Plugin_Initialize
  37.  for i=0 to UBound(sVals)
  38.      Call ReadIt(i+1,sVals(i)) 
  39.  next 
  40. END SUB
  41.  
  42. Sub ReadIt(ITM,VAL)
  43.   If GetWinVer=2 then
  44.  
  45.      s=RegReadValue(sPath & VAL)
  46.      if IsEmpty(s)=true then
  47.         Call SetUIElement(ITM,true)
  48.      else
  49.         Call SetUIElement(ITM,false)
  50.      end if
  51.  
  52.   else
  53.  
  54.     s=IniReadValue(sFile,sFileSec,VAL)
  55.     if len(s)>0 then
  56.        Call SetUIElement(ITM,false)
  57.     else
  58.        Call SetUIElement(ITM,true)
  59.     end if
  60.      
  61.   end if
  62.      
  63. End Sub
  64.  
  65. 'Called when the Plugin should validate the Data the user has entered
  66. SUB Plugin_CheckData(ElementIndex)
  67. END SUB
  68.  
  69. 'Called when the Plugin should apply the changes
  70. SUB Plugin_Apply(ElementIndex,ElementSubIndex)
  71.  for i=0 to UBound(sVals)
  72.      Call WriteIt(i+1,sVals(i)) 
  73.  next 
  74. END SUB
  75.  
  76. Sub WriteIt(ITM,VAL)
  77.  b=GetUIElement(ITM)
  78.  if b=true then
  79.     'Display it
  80.  
  81.     if GetWinVer=2 then  
  82.        s=RegReadValue(sPath & VAL)
  83.        if IsEmpty(s)=false then
  84.           Call RegDeleteValue(sPath & VAL)
  85.        end if
  86.     else
  87.        Call IniWriteValue(sFile,sFileSec,VAL,"")
  88.     end if
  89.  
  90.  else
  91.    'Hide it
  92.    
  93.    if GetWinVer=2 then
  94.       Call RegWriteValue(sPath & VAL,"1",1) 
  95.    else
  96.       Call IniWriteValue(sFile,sFileSec,VAL,"no")
  97.    end if
  98.  
  99.  end if   
  100. End Sub
  101.  
  102.  
  103. 'Called when the Plugin is about to be removed from memory
  104. SUB Plugin_Terminate
  105. END SUB
  106.  
  107.  
  108.